package com.quark.framework.utility;

import java.io.UnsupportedEncodingException;

import com.quark.framework.base.QuarkEnvironment;

public class QuarkUtilCharsetConverter {
	
	public static String convert2AppDefaultCharset(String content) throws UnsupportedEncodingException
	{		
		return convert(content, "ISO-8859-1", QuarkEnvironment.getInstance().appCharset);
	}
	public static String convert(String srcEncoding, String dstEncoding, String content)
	{
		try {
			return new String(content.getBytes(srcEncoding),dstEncoding);
		} catch (UnsupportedEncodingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return "";
		}
	}
}
